package me.yuzho.study.concurrency;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.stream.IntStream;

public class SingleThreadExecutor {

    public static void main(String[] args) {
        
        final ExecutorService  exec = Executors.newSingleThreadExecutor();
        
        IntStream.range(0, 6).forEach(i -> {
            exec.execute(new ListOff());
        });
        
        exec.shutdown();

    }

}
